# poll/urls.py
from django.urls import path
from polls import views

urlpatterns = [
    path('', views.index, name='index'),
    # path('snippet/', views.SnippetViewSet.as_view(), name='SnippetViewSet'),
]

from rest_framework import routers
from polls import views as polls_views

router = routers.DefaultRouter()
router.register(r'snippet', views.SnippetViewSet)

if router.urls and isinstance(router.urls, list):
    urlpatterns += router.urls
